import { Router } from 'express';
import { grammarController } from '@/controllers/grammar';
import validateRequest from '@/middleware/validateRequest';
import { body } from 'express-validator';

const router = Router();

// 语法检查（如需鉴权，添加对应中间件）
router.post(
  '/check',
  [
    body('text').isString().notEmpty().withMessage('text不能为空'),
  ],
  validateRequest,
  grammarController.check
);

export { router as grammarRoutes };
export default router;